import request from './config/request.js'

//注册
export function registerApi(params) {
	return request({
		url: '/api/login/register',
		method: 'POST',
		data: params,
	});
}
//登录
export function loginApi(params) {
	return request({
		url: '/api/login/phoneOrEmail',
		method: 'POST',
		data: params,
	});
}
//根据邮箱修改密码
export function updatePwdByEmailApi(params) {
	return request({
		url: '/api/login/updateByEmailUserInfoPwd',
		method: 'POST',
		data: params,
	});
}
//修改邮箱
export function updateEmailApi(params) {
	return request({
		url: '/api/user/updateUserEmailApi',
		method: 'POST',
		data: params,
	});
}
//修改密码
export function updatePasswordApi(params) {
	return request({
		url: '/api/user/updateUserPwdApi',
		method: 'POST',
		data: params,
	});
}

//获取当前用户信息
export function findUserInfoDetailsApi(params) {
	return request({
		url: '/api/user/findUserInfoDetailsApi',
		method: 'GET',
		data: params,
	});
}
//意见反馈
export function feedbackApi(params) {
	return request({
		url: '/api/user/set/save/feedback',
		method: 'POST',
		data: params,
	});
}
//注销账户
export function exitAccountApi(params) {
	return request({
		url: '/api/user/logoutAccount',
		method: 'POST',
		data: params,
	});
}
